<?php
/**
 * Created by PhpStorm.
 * User: beijingwhg
 * Date: 2017/5/5
 * Time: 上午10:06
 */

namespace App\Models;


use Illuminate\Foundation\Auth\User as Authenticatable;

class AdminModel extends Authenticatable
{
    /**
     * 管理员表
     */

    /**
     * primary key
     *
     * @var string
     */
    protected $primaryKey = 'admin_id';

    /**
     * table name
     *
     * @var string
     */
    protected $table = 'admins';

    /**
     * The attributes that are mass assignable.
     *
     * @var array
     */
    protected $fillable = [
        'role_id',
        'role_name',
        'nickname',
        'realname',
        'sex',
        'password',
        'email',
        'poster',
        'phone',
        'avatar',
    ];

    /**
     * The attributes excluded from the model's JSON form.
     *
     * @var array
     */
    protected $hidden = ['password', 'remember_token'];

    /**
     * The attributes that are time stamp.
     *
     * @var array
     */
    protected $dates = [
        'created_at',
        'updated_at',
        'last_login_at',
        'last_action_at'
    ];
}